import { requestClient } from '#/api/request';

/**
 * 获取颜色列表
 */
export async function getColorList(params: any) {
  return requestClient.get('/admin/Color/index', params);
}

/**
 * 颜色添加
 */
export async function doColorAdd(params: any) {
  return requestClient.post('/admin/Color/add', params);
}

/**
 * 颜色编辑
 */
export async function doColorEdit(params: any) {
  return requestClient.post('/admin/Color/edit', params);
}

/**
 * 颜色删除
 */
export async function doColorDelete(params: any) {
  return requestClient.post('/admin/Color/del', params);
}

/**
 * 同步到ERP
 */
export async function doColorSyncErp(params: any) {
  return requestClient.post('/admin/Color/syncErp', params);
}

/**
 * 获取颜色分组列表（用于远程搜索）
 */
export async function getColorGroupList(params: any) {
  return requestClient.get('/admin/ColorGroup/index', params);
}

/**
 * 颜色详情
 */
export async function doColorInfo(params: any) {
  return requestClient.get('/admin/Color/edit', params);
}

/**
 * 切换状态
 */
export async function doColorToggleStatus(params: any) {
  return requestClient.post('/admin/Color/edit', params);
}

